package com.tuyulong.mybatis.mapper;

import com.tuyulong.mybatis.model.SysUserDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


@Mapper
public interface SysUserMapper {


    /**
     * 获取用户
     * @param user
     * @return
     */
    SysUserDO getUserByAccount(@Param("decrypt") SysUserDO user);

    /**
     * 通过账户或姓名查询用户
     * @param dto
     * @return
     */
    List<SysUserDO> getUserByAccountOrName(@Param("decrypt") SysUserDO dto,@Param("neId") Long id);


    /**
     * 保存
     * @param user
     */
    void save(@Param("decrypt") SysUserDO user);

    /**
     * 更新用户
     * @param user
     */
    void updateUserById(@Param("decrypt") SysUserDO user);

}
